# 定义一个用户类，有属性姓名、年龄、性别、手机号、登录密码、邮箱、地址、注册时间、最后登录时间等
from datetime import time


class User:
    def __init__(self, name, age, gender, phone_number, login_password, email, address, register_time, last_login_time):
        self.name = name
        self.age = age
        self.gender = gender
        self.phone_number = phone_number
        self.login_password = login_password
        self.email = email
        self.address = address
        self.register_time = register_time
        self.last_login_time = last_login_time

    # 定义一个方法，用于修改用户的个人信息
    def update_info(self, new_name=None, new_age=None, new_gender=None, new_phone_number=None, new_email=None,
                    new_address=None):
        self.name = new_name
        self.age = new_age
        self.gender = new_gender
        self.phone_number = new_phone_number
        self.email = new_email
        self.address = new_address
        self.register_time = time.time()
        self.last_login_time = time.time()

